<template>
  <div class="topbar">
    <!-- 版心 -->
    <div class="wrap topbarwrap">
      <!-- 左侧 -->
      <div class="left">欢迎来到叩丁狼积分商城</div>
      <!-- 右侧导航 -->
      <ul class="right">
        <li>
          <img src="../assets/img/userImg.f8bbec5e.png" width="23px" alt="">
          用户名:游客
        </li>
        <li>我的积分:--</li>
        <li>获取积分</li>
        <li>叩丁狼官网</li>
        <li class="btnlogin" @click="changeIsShowLoginModal(true)">登录</li>
      </ul>
    </div>
  </div>
</template>

<script>
import {mapMutations} from 'vuex'
export default {
  methods:{
    ...mapMutations({
      //当前组件的方法名："模块名/模块下的方法名"
      changeIsShowLoginModal:"showModal/changeIsShowLoginModal"
    })
  }
}
</script>

<style  lang="less" scoped>
.topbar{
  height: 40px;
  line-height: 40px;
  background-color: #242b39;
  font-size: 14px;
  color: #fffefe;
  .topbarwrap{
    display: flex;
    justify-content: space-between;
  }
  .right{
    li{
      float: left;
      margin-left: 20px;
      cursor: pointer;
      text-align: center;
      img{
        vertical-align: middle;
        border-radius: 50%;
      }
      &.btnlogin{
        width: 124px;
        height: 40px;
        background: #0a328e;
      }
    }
  }
}
</style>